package com.hwua.service.Impl;

import com.hwua.dao.INewsDao;
import com.hwua.dao.Impl.NewsDaoImpl;
import com.hwua.entity.News;
import com.hwua.service.INewsService;

import java.util.List;

public class NewsServiceImpl implements INewsService {
    private INewsDao newsDao=new NewsDaoImpl();
    @Override
    public List<News> showAll() throws Exception {
        return newsDao.queryAll();
    }

    @Override
    public News showNewsById(Long id) throws Exception {
        return newsDao.query(id);
    }
}
